class Work < ActiveRecord::Base

  has_and_belongs_to_many :users

  validates_presence_of :title, :message => 'missing'
  validates_presence_of :description, :message => 'missing'
  validates_presence_of :authors, :message => 'missing'

  validates_length_of :title, :minimum => 1, :message => 'min'
  validates_length_of :authors, :maximum => 1500, :message => 'max'
  validates_length_of :title, :maximum => 300, :message => 'max'
  validates_length_of :description, :minimum => 1, :message => "min"
  validates_length_of :description, :maximum => 1200, :message => "max"

end

